﻿// ===============================================================================
// InjectionTest.cs
// EOS Web Framework
// ===============================================================================
// Copyright (c) EOS Development Group. All rights reserved.
// ===============================================================================

namespace EOS.Framework.Web.Mvc.Tests
{
    using System;
    using EOS.Framework.Web.Mvc;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    /// <summary>
    /// This is a test class for InjectionTest and is intended
    /// to contain all InjectionTest Unit Tests
    /// </summary>
    [TestClass()]
    public class InjectionTest
    {
        private TestContext testContextInstance;

        /// <summary>
        /// Gets or sets the test context which provides
        /// information about and functionality for the current test run.
        /// </summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        /// <summary>
        /// A test for InjectValue. Object cannot be null.
        /// </summary>
        [TestMethod()]
        [ExpectedException(typeof(ArgumentNullException))]
        public void InjectValueNullObjectExceptionTest()
        {
            Injection.InjectValue(null, "Name", "Foo");
        }

        /// <summary>
        /// A test for InjectValue. Name cannot be null.
        /// </summary>
        [TestMethod()]
        [ExpectedException(typeof(ArgumentNullException))]
        public void InjectValueNullNameExceptionTest()
        {
            Injection.InjectValue("Foo", null, "Foo");
        }

        /// <summary>
        /// A test for InjectValue. Name cannot be empty.
        /// </summary>
        [TestMethod()]
        [ExpectedException(typeof(ArgumentException))]
        public void InjectValueEmptyNameExceptionTest()
        {
            Injection.InjectValue("Foo", string.Empty, "Foo");
        }       
        
        /// <summary>
        /// A test for InjectValue. Name cannot contains only blanks.
        /// </summary>
        [TestMethod()]
        [ExpectedException(typeof(ArgumentException))]
        public void InjectValueBlanksOnlyNameExceptionTest()
        {
            Injection.InjectValue("Foo", " ", "Foo");
        }

        /// <summary>
        /// A test for InjectValue. Value cannot be null.
        /// </summary>
        [TestMethod()]
        [ExpectedException(typeof(ArgumentNullException))]
        public void InjectValueNullValueExceptionTest()
        {
            Injection.InjectValue("Foo", "Name", null);
        }

        /// <summary>
        /// A test for InjectValue
        /// </summary>
        [TestMethod()]
        public void InjectValueTest()
        {
        }
    }
}
